<?php
include_once("../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'equipment'");
?>

<?php include "../../coresection/checkSession.php";?>
<?php include "../../coresection/admin-product.php";?>
<?php include "../../coresection/order-list.php";?>

<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-list-function.php");
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include '../../modules/head.php'; ?>
</head>

<body>

<?php include '../../modules/topbar.php'; ?>

<div class="setup_area">


    <?php include '../../modules/sidebar-admin.php'; ?>

    <div class="header">
        <h1>维修记录</h1>

        <?php include '../../modules/header.php'; ?>

    </div>





<div class="content_area dishes_box">


<form id="add-rental-form" method="post" action="detail-add-function.php?nav-itemed=equipment" enctype="multipart/form-data" class="layui-form">


    <? $equipment=select_one_line_all_items($table_Prefix."equipment","nid = '".$_REQUEST['equipmentid']."'")?>

    <? $equipment_list=select_lines_all_items($table_Prefix."equipment","nid desc","status = '正常'","0"); ?>

    <b>维修申请</b>
<hr/>
    <div class="layui-form-item">
        <label class="layui-form-label">事件标题</label>
        <div class="layui-input-block">

            <input type="text" name="ai_name" placeholder="维修内容" autocomplete="off" class="layui-input" value="<?echo $detail['name']?>">

        </div>
    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">设备</label>
        <div class="layui-input-block">
            <select name="ai_equipmentid" lay-search=""   lay-verify="required">

                    <option value="<? echo $_REQUEST['equipmentid'] ?>"> <? echo $equipment['name'] ?></option>

                <? for($i=0;$i<count($equipment_list);$i++){ ?>
                    <option value="<? echo $equipment_list[$i]['nid'] ?>"> <? echo $equipment_list[$i]['name'] ?></option>
                <? } ?>

            </select>
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">申请人</label>
        <div class="layui-input-block">
            <input value="<?php echo $user_name ?>" readonly="readonly" class="layui-input" style="color:#038c8c!important" />
                <input type="hidden" name="ai_authur" type="hidden" value="<?php echo $user_id ?>">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">登记时间</label>
        <div class="layui-input-block">
            <input value="<?echo date("Y-m-d h:i:s")?>" readonly="readonly" class="layui-input" style="color:#038c8c!important"/>

            <input type="hidden" name="ai_date" value="<?echo date("Y-m-d h:i:s")?>">
        </div>
    </div>








    <div class="layui-form-item">
        <label class="layui-form-label">申请日期</label>
        <div class="layui-input-block">
            <input type="text" name="ai_repairdate" id="date" autocomplete="off" class="layui-input"  value="<?echo date('Y-m-d')?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">
        </div>
    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-block">

            <input type="text" name="ai_contactor" placeholder="请输入联系人姓名" autocomplete="off" class="layui-input" value=" ">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">

            <input type="text" name="ai_contactphone" placeholder="请输入联系电话" autocomplete="off" class="layui-input" value=" ">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">发生地点</label>
        <div class="layui-input-block">

            <input type="text" name="ai_location" placeholder="请输入联系电话" autocomplete="off" class="layui-input" value=" ">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">处理级别</label>
        <div class="layui-input-block">

            <input type="text" name="ai_level" placeholder="请输入联系电话" autocomplete="off" class="layui-input" value=" ">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">发生时间</label>
        <div class="layui-input-block">
            <input type="text" name="ai_applydate" id="date" autocomplete="off" class="layui-input"  value="<?echo date('Y-m-d')?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">

        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">局名</label>
        <div class="layui-input-block">

            <input type="text" name="ai_placedepartment" placeholder="请输入联系人姓名" autocomplete="off" class="layui-input" value="<?echo $detail['name']?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">申请部门</label>
        <div class="layui-input-block">

            <input type="text" name="ai_department" placeholder="请输入联系人姓名" autocomplete="off" class="layui-input" value="<?echo $detail['name']?>">
        </div>
    </div>







    <? $borrower_list=select_lines_all_items("user","nid desc","","0"); ?>

    <div class="layui-form-item">
        <label class="layui-form-label">经办人</label>
        <div class="layui-input-block">
            <select name="ai_borrower" lay-search=""   lay-verify="required">
                <option value=""></option>

                <? for($i=0;$i<count($borrower_list);$i++){ ?>
                    <option value="<? echo $borrower_list[$i]['nid'] ?>"><? echo $borrower_list[$i]['user_id'] ?> : <? echo $borrower_list[$i]['user_name'] ?></option>
                <? } ?>
            </select>
        </div>
    </div>



    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">故障描述</label>
        <div class="layui-input-block">
            <textarea name="ai_remark" placeholder="请报障人故障描述时，将故障情况描述清晰，若是设备问题，请登记设备品牌，型号。
    例子1:(硬件类)：农林支行vip台席磁条读写器无卡读折，卡。" class="layui-textarea"></textarea>
        </div>
    </div>





<b>维修结果</b>
<hr/>






    <div class="layui-form-item">
        <label class="layui-form-label">维修费用</label>
        <div class="layui-input-block">
            <input type="text" name="ai_cost" placeholder="维修金额" autocomplete="off" class="layui-input" value="<?echo $detail['cost']?>">
        </div>
    </div>







    <div class="layui-form-item">
        <label class="layui-form-label">维修公司</label>
        <div class="layui-input-block">
            <input type="text" name="ai_repair_company" placeholder="维修公司" autocomplete="off" class="layui-input" value="<?echo $detail['repair_company']?>">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">维修日期</label>
        <div class="layui-input-block">
            <input type="text" name="ai_weixiuriqi" id="date" autocomplete="off" class="layui-input"  value="<?echo date('Y-m-d')?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">归还日期</label>
        <div class="layui-input-block">
            <input type="text" name="ai_returndate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="ai_status" value="正常" title="维修完毕">
            <input type="radio" name="ai_status" value="维修" title="维修中" checked>
        </div>
    </div>








        <input name="sys_part" type="hidden" value="<? echo $system_part ?>"/>
        <input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>"/>
        <input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>"/>










        <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formrentalAdd" type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
 

 
 
        </div>
		
 
 
<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>







<?php include '../../modules/footer.php'; ?>
</body>
</html>